Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Honest Strategy Revamp to Consider Path Weights #634

Open
wants to merge 1 commit into
base: is-essential-confirmable
Choose a base branch
from

Conversation

rauljordan
Copy link
Collaborator

@rauljordan rauljordan commented May 3, 2024

Key reading:

Current approach:

  • Only the root edge of the block level challenge is ever confirmed by time. We don’t care about confirming any other edges by time. The only other confirmation type that exists is by one step proof win, which happens at the small step challenge level
  • Each time the root, block challenge edge tracker “ticks”, it updates its inherited timer using the bold challenge manager’s in-memory honest tree. It uses a recursive computation to figure out its inherited timer. If that inherited timer is >= 1 CHALLENGE PERIOD, the edge tracker initiates a “confirmation job”
  • Right now, edge trackers have 3 main moves they can make: bisect, open subchallenge, one step prove. There are certain conditions that must be met for the finite state machine to decide which action to take. However, we need to add additional conditions as described below
    Revamp:
  • We can confirm any “root” edge by time, and we should do so. That is, we should not only confirm the block challenge root edge, but also the subchallenge root edges. It is important they reach “confirmed” status so that their bonds can be reimbursed
  • We change the rules of when the honest validator can make certain moves. That is, it should only open a subchallenge, bisect, or one step prove if the normal conditions for those actions are met AND additional “path timer” conditions are met (more on this later)
  • We change how the code determines if an edge is “confirmable by time” to use path weight / essential path rules instead of the current approach

Terminology remapping:

  • Path weight: the sum of the local timers along a path of edges up to some root edge
  • Node: can be taken to mean edge
  • Refinement node: a subchallenge root edge
  • Terminal node: the edge that a subchallenge root edge claims at a higher level
  • Proof node: any lowest level subchallenge edge

Places to change:

  • Change the conditions for tryToConfirm edge in the edge tracker file to use a function called IsConfirmableEssentialNode, which checks all the path weights from that edge to its essential root have a minimum of 1 CHALLENGE_PERIOD. The logic or checking all path weights have that minimum is implemented in challenge-manager/challenge-tree/paths.go using a min heap
  • Change the Act() function in bisections, subchallenges, or one step proofs to consider not acting if the path weight of the edge to its closest essential ancestor is >= 1 CHALLENGE_PERIOD
  • Evaluate if any changes need to be made to confirmation_job.go
  • Check in our e2e test that we also confirm the essential root edges in addition to winning the challenge

@rauljordan rauljordan force-pushed the honest-strategy-changes branch 2 times, most recently from 4bb65bd to 1cfe2fd Compare September 20, 2024 15:39
@rauljordan rauljordan changed the title update how root nodes are confirmed Honest Strategy Revamp to Consider Path Weights Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant